import React from "react";
import actions from "../store/actions/counter1";
import { connect } from "../react-redux";

class Counter1 extends React.Component {
  render() {
    return (
      <div>
        <p>{this.props.number}</p>
        <button onClick={this.props.add1}>+</button>
        <button onClick={this.props.minus1}>-</button>
        <button onClick={this.props.thunkAdd1}>thunkAdd1</button>
        <button onClick={this.props.promiseAdd1}>promiseAdd1</button>
        <button onClick={this.props.promiseAdd2}>promiseAdd2</button>
      </div>
    );
  }
}
let mapStateToProps = (state) => state.counter1;
let mapDispatchToProps = actions;
export default connect(mapStateToProps, mapDispatchToProps)(Counter1);
